Skip to content

Pin astral-sh/ruff-action to a specific commit#3265

Merged
svartkanin merged 1 commit intoarchlinux:masterfrom
correctmost:cm/pin-ruff-action
Mar 22, 2025
Merged

Pin astral-sh/ruff-action to a specific commit#3265
svartkanin merged 1 commit intoarchlinux:masterfrom
correctmost:cm/pin-ruff-action

Conversation

@correctmost
Copy link
Copy Markdown
Contributor

@correctmost correctmost requested a review from Torxed as a code owner March 15, 2025 22:22
@svartkanin
Copy link
Copy Markdown
Collaborator

Interesting, so this means that we need to keep track of releases and manually update the hash moving forward. So if there was vulnerabilities discovered in previous versions we need to be aware of that and potentially update the hash.
Generally this seems kinda counter intuitive, the idea of using "latest" IMHO is to not having to monitor things constantly and relay on the most up-to-date version with fixes. Now the recommendation is to move backwards and pin things...

@correctmost
Copy link
Copy Markdown
Contributor Author

It seems like Renovate can handle the bumping of actions with specific commit hashes: https://docs.renovatebot.com/presets-helpers/#helperspingithubactiondigests

I will look into adding ruff-action to renovate.json.

@svartkanin
Copy link
Copy Markdown
Collaborator

So would the updates be pushed for every new tag release hash?

The GitHub docs recommend pinning third-party actions to specific
commits for security hardening purposes.
@correctmost
Copy link
Copy Markdown
Contributor Author

So would the updates be pushed for every new tag release hash?

Yep. With my latest commit, Renovate bot should now submit PRs for actions releases using a hash instead of a tag (because tags are mutable).

This change will affect all actions, including ones from GitHub. If things get too noisy, we can add some additional config to schedule the updates less frequently.

@svartkanin
Copy link
Copy Markdown
Collaborator

Okay lets try it out

@svartkanin svartkanin merged commit 083194f into archlinux:master Mar 22, 2025
8 checks passed
@correctmost correctmost deleted the cm/pin-ruff-action branch March 22, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants